


using System;
using SubSonic.Schema;
using System.Collections.Generic;
using SubSonic.DataProviders;
using System.Data;

namespace myMvcBlog {
	
        /// <summary>
        /// Table: Post
        /// Primary Key: ID
        /// </summary>

        public class PostTable: DatabaseTable {
            
            public PostTable(IDataProvider provider):base("Post",provider){
                ClassName = "Post";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });

                Columns.Add(new DatabaseColumn("UrlName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 500
                });

                Columns.Add(new DatabaseColumn("Excerpt", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 1000
                });

                Columns.Add(new DatabaseColumn("Content", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = -1
                });

                Columns.Add(new DatabaseColumn("PostedTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("LastCommentedTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsPublished", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PublishedTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
            public IColumn UrlName{
                get{
                    return this.GetColumn("UrlName");
                }
            }
				
   			public static string UrlNameColumn{
			      get{
        			return "UrlName";
      			}
		    }
            
            public IColumn Excerpt{
                get{
                    return this.GetColumn("Excerpt");
                }
            }
				
   			public static string ExcerptColumn{
			      get{
        			return "Excerpt";
      			}
		    }
            
            public IColumn Content{
                get{
                    return this.GetColumn("Content");
                }
            }
				
   			public static string ContentColumn{
			      get{
        			return "Content";
      			}
		    }
            
            public IColumn PostedTime{
                get{
                    return this.GetColumn("PostedTime");
                }
            }
				
   			public static string PostedTimeColumn{
			      get{
        			return "PostedTime";
      			}
		    }
            
            public IColumn LastCommentedTime{
                get{
                    return this.GetColumn("LastCommentedTime");
                }
            }
				
   			public static string LastCommentedTimeColumn{
			      get{
        			return "LastCommentedTime";
      			}
		    }
            
            public IColumn IsPublished{
                get{
                    return this.GetColumn("IsPublished");
                }
            }
				
   			public static string IsPublishedColumn{
			      get{
        			return "IsPublished";
      			}
		    }
            
            public IColumn PublishedTime{
                get{
                    return this.GetColumn("PublishedTime");
                }
            }
				
   			public static string PublishedTimeColumn{
			      get{
        			return "PublishedTime";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Comment
        /// Primary Key: ID
        /// </summary>

        public class CommentTable: DatabaseTable {
            
            public CommentTable(IDataProvider provider):base("Comment",provider){
                ClassName = "Comment";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PostID", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Content", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = -1
                });

                Columns.Add(new DatabaseColumn("Author", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("Email", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });

                Columns.Add(new DatabaseColumn("Site", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });

                Columns.Add(new DatabaseColumn("IP", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });

                Columns.Add(new DatabaseColumn("CommentTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsSpam", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn PostID{
                get{
                    return this.GetColumn("PostID");
                }
            }
				
   			public static string PostIDColumn{
			      get{
        			return "PostID";
      			}
		    }
            
            public IColumn Content{
                get{
                    return this.GetColumn("Content");
                }
            }
				
   			public static string ContentColumn{
			      get{
        			return "Content";
      			}
		    }
            
            public IColumn Author{
                get{
                    return this.GetColumn("Author");
                }
            }
				
   			public static string AuthorColumn{
			      get{
        			return "Author";
      			}
		    }
            
            public IColumn Email{
                get{
                    return this.GetColumn("Email");
                }
            }
				
   			public static string EmailColumn{
			      get{
        			return "Email";
      			}
		    }
            
            public IColumn Site{
                get{
                    return this.GetColumn("Site");
                }
            }
				
   			public static string SiteColumn{
			      get{
        			return "Site";
      			}
		    }
            
            public IColumn IP{
                get{
                    return this.GetColumn("IP");
                }
            }
				
   			public static string IPColumn{
			      get{
        			return "IP";
      			}
		    }
            
            public IColumn CommentTime{
                get{
                    return this.GetColumn("CommentTime");
                }
            }
				
   			public static string CommentTimeColumn{
			      get{
        			return "CommentTime";
      			}
		    }
            
            public IColumn IsSpam{
                get{
                    return this.GetColumn("IsSpam");
                }
            }
				
   			public static string IsSpamColumn{
			      get{
        			return "IsSpam";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: PostTag
        /// Primary Key: ID
        /// </summary>

        public class PostTagTable: DatabaseTable {
            
            public PostTagTable(IDataProvider provider):base("PostTag",provider){
                ClassName = "PostTag";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PostID", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("TagID", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn PostID{
                get{
                    return this.GetColumn("PostID");
                }
            }
				
   			public static string PostIDColumn{
			      get{
        			return "PostID";
      			}
		    }
            
            public IColumn TagID{
                get{
                    return this.GetColumn("TagID");
                }
            }
				
   			public static string TagIDColumn{
			      get{
        			return "TagID";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: PostCategory
        /// Primary Key: ID
        /// </summary>

        public class PostCategoryTable: DatabaseTable {
            
            public PostCategoryTable(IDataProvider provider):base("PostCategory",provider){
                ClassName = "PostCategory";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PostID", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("CategoryID", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn PostID{
                get{
                    return this.GetColumn("PostID");
                }
            }
				
   			public static string PostIDColumn{
			      get{
        			return "PostID";
      			}
		    }
            
            public IColumn CategoryID{
                get{
                    return this.GetColumn("CategoryID");
                }
            }
				
   			public static string CategoryIDColumn{
			      get{
        			return "CategoryID";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Category
        /// Primary Key: ID
        /// </summary>

        public class CategoryTable: DatabaseTable {
            
            public CategoryTable(IDataProvider provider):base("Category",provider){
                ClassName = "Category";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("UrlName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 100
                });

                Columns.Add(new DatabaseColumn("AddedTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsActive", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
            public IColumn UrlName{
                get{
                    return this.GetColumn("UrlName");
                }
            }
				
   			public static string UrlNameColumn{
			      get{
        			return "UrlName";
      			}
		    }
            
            public IColumn AddedTime{
                get{
                    return this.GetColumn("AddedTime");
                }
            }
				
   			public static string AddedTimeColumn{
			      get{
        			return "AddedTime";
      			}
		    }
            
            public IColumn IsActive{
                get{
                    return this.GetColumn("IsActive");
                }
            }
				
   			public static string IsActiveColumn{
			      get{
        			return "IsActive";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Tag
        /// Primary Key: ID
        /// </summary>

        public class TagTable: DatabaseTable {
            
            public TagTable(IDataProvider provider):base("Tag",provider){
                ClassName = "Tag";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("ID", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("UrlName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 100
                });

                Columns.Add(new DatabaseColumn("AddedTime", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsActive", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn ID{
                get{
                    return this.GetColumn("ID");
                }
            }
				
   			public static string IDColumn{
			      get{
        			return "ID";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
            public IColumn UrlName{
                get{
                    return this.GetColumn("UrlName");
                }
            }
				
   			public static string UrlNameColumn{
			      get{
        			return "UrlName";
      			}
		    }
            
            public IColumn AddedTime{
                get{
                    return this.GetColumn("AddedTime");
                }
            }
				
   			public static string AddedTimeColumn{
			      get{
        			return "AddedTime";
      			}
		    }
            
            public IColumn IsActive{
                get{
                    return this.GetColumn("IsActive");
                }
            }
				
   			public static string IsActiveColumn{
			      get{
        			return "IsActive";
      			}
		    }
            
                    
        }
        
}